//**************************************************
//	Digit Widgets Manual Module
// 	Manual Move,Scale and Rotation Routine
//	Made to be called from Hyperlinked Digit_Widgets Script
//
// Version 3.0 - 09/12/01 - Added Animation Script to Widgets
//	Version 3.1 - 09/15/01 - Updated with Advanced and Standard Animation Scripts
//**************************************************
<zscriptinsert,"Digit_Widgets_Common_Std.txt">
[PD]
//**************************************************************************
//********************Manipulate an Object*********************************
//**************************************************************************
[FontSetColor,255,200,0]Object Manipulate[FontSetColor,160,160,160]
[PD]
[iSwitch,"SelectMove ",1,"Add Move Action"] 
[iSlider,"MoveX  ",0,.1,-1000,DocWidth,"Manipulate  X ", [varSet,TransX,zscript:MoveX],0,[TextCalcWidth,Distance1453]]
[iSlider,"MoveY  ",0,.1,-1000,DocHeight,"Manipulate Y",[varSet,TransY,zscript:MoveY],0,[TextCalcWidth,Distance1453]]
[iSlider,"MoveZ  ",0,.1,-2000,2000,"Manipulate  Z",[varSet,TransZ,zscript:MoveZ],0,[TextCalcWidth,Distance1453]]
[iSwitch,"RelativeM",1,"Relative Manipulation"] 
[PD]
[iSwitch,"SelectScale ",1,"Add Scale Action"] 
[iSlider,"ScaleX  ",0,.1,-1000,DocWidth,"Manipulate  X ", [varSet,TransXS,zscript:ScaleX],0,[TextCalcWidth,Distance1453]]
[iSlider,"ScaleY  ",0,.1,-1000,DocHeight,"Manipulate Y",[varSet,TransYS,zscript:ScaleY],0,[TextCalcWidth,Distance1453]]
[iSlider,"ScaleZ  ",0,.1,-2000,2000,"Manipulate  Z",[varSet,TransZS,zscript:ScaleZ],0,[TextCalcWidth,Distance1453]]
[iSwitch,"RelativeS",1,"Relative Manipulation"] 
[PD]
[iSwitch,"SelectRotation ",1,"Add Rotation Action"] 
[iSlider,"RotateX  ",0,.1,-180,180,"Manipulate  X ", [varSet,TransXR,zscript:RotateX],0,[TextCalcWidth,Distance1453]]
[iSlider,"RotateY  ",0,.1,-180,180,"Manipulate Y",[varSet,TransYR,zscript:RotateY],0,[TextCalcWidth,Distance1453]]
[iSlider,"RotateZ  ",0,.1,-180,180,"Manipulate  Z",[varSet,TransZR,zscript:RotateZ],0,[TextCalcWidth,Distance1453]]
[PD]
[iSwitch,"RelativeR",1,"Relative Manipulation"] 

[iSwitch,"Snapshot",0,"Perform Snapshot"] 

[iButton," ManObject ","Manipulate Object",
	//go ahead and get all of the current data
	[TransformGet,currX,currY,currZ,currXS,currYS,currZS,currXR,currYR,currZR]
	[varSet,KeepX,currX]
	[varSet,KeepY,currY]
	[varSet,KeepZ,currZ]
	[varSet,KeepXS,currXS]
	[varSet,KeepYS,currYS]
	[varSet,KeepZS,currZS]
	[varSet,KeepXR,currXR]
	[varSet,KeepYR,currYR]
	[varSet,KeepZR,currZR]
	
	[if,[iGet,zscript:SelectMove],
		[varAdd,currX,TransX]
		[varAdd,currY,TransY]
		[varAdd,currZ,TransZ]
		[TransformSet,currX,currY,currZ]
	]//endif

	[if,[iGet,zscript:SelectScale],
			[varAdd,currXS,TransXS]
			[varAdd,currYS,TransYS]
			[varAdd,currZS,TransZS]
			[TransformSet,,,,currXS,currYS,currZS]
	]//endif

	[if,[iGet,zscript:SelectRotation],
			[if,currXR<0,[varMul,TransXR,-1]]
			[if,currYR<0,[varMul,TransYR,-1]]
			[if,currZR<0,[varMul,TransZR,-1]]
			[varAdd,currXR,TransXR]
			[varAdd,currYR,TransYR]
			[varAdd,currZR,TransZR]
			[TransformSet,,,,,,,currXR,currYR,currZR]
	]//endif
	[if,[iGet,zscript:Snapshot],
		[IPress,Transform:Snapshot]
	]//endif
]//end of ManObject
[iButton," Return Object ","Return Object to last",
	[TransformSet,KeepX,KeepY,KeepZ,KeepXS,KeepYS,KeepZS,KeepXR,KeepYR,KeepZR]
]
[PD]
[pd][penMove,0,8]
<zscriptinsert,"Widgets_Index_Include_Std.txt">
[pd][penMove,0,8]
\C00e0e0About This ZScript:\Cc0c0c0
This script will allow you to simply move a selected object repeatedly by increments. Make sure that the proper \Cffa000Select\Cc0c0c0 Switches are activated for the transformation you wish to perform \Cffa000MOVE\Cc0c0c0, \Cffa000SCALE\Cc0c0c0, and/or \Cffa000ROTATE\Cc0c0c0. Press the \Cffa000ManObj\Cc0c0c0 button to do the transformation. Select the \Cffa000Snapshot\Cc0c0c0 switch to automatically snapshot the object to the canvas. Undo the last Transformation by pressing the \Cffa000Return Object\Cc0c0c0 button.
[pd][penMove,0,8]
\Cffa000Important\Cc0c0c0 to use this script you must be holding the desired object in either Move, Scale or Rotation mode, in other words the Gyro must be visible for the script to manipulate the desired object.
[PD]
[fontSetSizeSmall]Standard Digit Widget Manual Revision 1.0, created by Digits
